package com.ruoyi.api.queue;

import com.ruoyi.api.vo.AsyncVo;
import com.ruoyi.shop.vo.UserOrderVo;
import org.springframework.stereotype.Component;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * @Author Alan Zhang
 * @Date 2021/10/12 10:58
 */
@Component
public class RequestOrderQueue {

    /**
     * 处理下订单接口的队列，设置缓冲容量为50
     */
    private BlockingQueue<AsyncVo<UserOrderVo, Object>> orderQueue = new LinkedBlockingQueue<>(50);

    public BlockingQueue<AsyncVo<UserOrderVo, Object>> getOrderQueue() {
        return orderQueue;
    }
}
